bitkeeper revision 1.1516 (4292225caWyLsfo-mZ3yV4QmUhXSAQ)
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Mon, 23 May 2005 18:35:08 +0000 (18:35 +0000)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Mon, 23 May 2005 18:35:08 +0000 (18:35 +0000)
Fix the veth0/vif0.0 loopback interfaces to properly assert integrity
of locally-generated packets. Hopefully this will fix dom0->domU
communications. As an aside, I think 'proto_csum_valid' is not a good
name for that field -- I may rename to 'proto_data_valid' or something
like that.
Signed-off-by: Keir Fraser <keir@xensource.com>
linux-2.6.11-xen-sparse/drivers/xen/netback/loopback.c

index 6f92f3d939b14159557758acad0dc3606eb8abb3..fa19e600c2fea92226c1103a3ab42bdb74d9bcef 100644 (file)
@@ -68,7 +68,13 @@ static int loopback_start_xmit(struct sk_buff *skb, struct net_device *dev)
     np->stats.rx_packets++;
 
     if ( skb->ip_summed == CHECKSUM_HW )
+    {
+        /* Defer checksum calculation. */
         skb->proto_csum_blank = 1;
+        /* Must be a local packet: assert its integrity. */
+        skb->proto_csum_valid = 1;
+    }
+
     skb->ip_summed = skb->proto_csum_valid ?
         CHECKSUM_UNNECESSARY : CHECKSUM_NONE;